﻿// Decompiled with JetBrains decompiler
// Type: TaleWorlds.CampaignSystem.Party.PartyComponents.PartyComponent
// Assembly: TaleWorlds.CampaignSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E85F8C15-4DF6-4E9C-A58A-29177E40D07A
// Assembly location: D:\steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client\TaleWorlds.CampaignSystem.dll

using System.Collections.Generic;
using TaleWorlds.CampaignSystem.Settlements;
using TaleWorlds.Library;
using TaleWorlds.Localization;

#nullable disable
namespace TaleWorlds.CampaignSystem.Party.PartyComponents
{
  public abstract class PartyComponent
  {
    protected virtual void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
    {
    }

    public MobileParty MobileParty { get; private set; }

    public PartyBase Party => this.MobileParty.Party;

    public abstract Hero PartyOwner { get; }

    public abstract TextObject Name { get; }

    public abstract Settlement HomeSettlement { get; }

    public virtual bool AvoidHostileActions => false;

    public virtual int WagePaymentLimit => Campaign.Current.Models.PartyWageModel.MaxWage;

    public virtual void SetWagePaymentLimit(int newLimit)
    {
      Debug.FailedAssert("Invalid set wage payment limit function usage!", "C:\\Develop\\MB3\\Source\\Bannerlord\\TaleWorlds.CampaignSystem\\Party\\PartyComponents\\PartyComponent.cs", nameof (SetWagePaymentLimit), 28);
    }

    public virtual Hero Leader => (Hero) null;

    internal void SetMobilePartyInternal(MobileParty party) => this.MobileParty = party;

    internal void Initialize(MobileParty party)
    {
      this.SetMobilePartyInternal(party);
      this.OnInitialize();
    }

    internal void Finish() => this.OnFinalize();

    protected virtual void OnInitialize()
    {
    }

    protected virtual void OnFinalize()
    {
    }

    public virtual void ClearCachedName()
    {
    }

    public virtual void ChangePartyLeader(Hero newLeader)
    {
    }

    public virtual void GetMountAndHarnessVisualIdsForPartyIcon(
      PartyBase party,
      out string mountStringId,
      out string harnessStringId)
    {
      mountStringId = "";
      harnessStringId = "";
    }

    public delegate void OnPartyComponentCreatedDelegate(MobileParty mobileParty);
  }
}
